package se.webbzon.boltzmann.editor.mvc;

import java.io.File;
import java.util.Collection;

import se.webbzon.oschi01.worldarea.WorldArea;
import se.webbzon.oschi01.worldobject.WorldObject;

public interface EditorListener {

	/*============================================================
	Public Methods
	============================================================*/
	
	/** This method is invoked when a file is selected in the model. If the
	 * file was discarded then null will be sent for the parameter "file". **/
	public void onSelectFile(Object source, File file);
	
	/** This method is invoked when a world area is opened. **/
	public void onOpenWorld(Object source, WorldArea world);
	
	/** This method is invoked when a world area is closed. **/
	public void onCloseWorld(Object source, WorldArea world);
	
	/** This method is invoked when an instance is added to the world area. **/
	public void onAddInstance(Object source, WorldObject instance);
	
	/** This method is invoked when an instance is removed from the world area. **/
	public void onRemoveInstance(Object source, WorldObject instance);
	
	/** This method is invoked when an instance is changed. **/
	public void onChangeInstance(Object source, WorldObject instance);
	
	/** This method is invoked when an instance gets focus. **/
	public void onFocusInstance(Object source, WorldObject instance);
	
	/** This method is invoked when one or more instances are selected in the world area.**/
	public void onSelectInstances(	Object source,
									Collection<WorldObject> selectedInstances,
									Collection<WorldObject> deselectedInstances);
	


}

